<% def springSecurityService = application.getAttribute("org.codehaus.groovy.grails.APPLICATION_CONTEXT").getBean("springSecurityService") %>
<% def stringManagerService = application.getAttribute("org.codehaus.groovy.grails.APPLICATION_CONTEXT").getBean("stringManagerService") %>
<g:if test="${(springSecurityService?.currentUser?.role?.level <= 0) || (springSecurityService?.currentUser == comment.owner)}">
<g:link controller="comment" action="delete" id="${comment.id}"><input type="image" src="${resource(dir: 'images', file: 'icn_trash.png')}" title="Trash" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');"></g:link>
</g:if>